package cn.me.alphamq.nameserver.starter;

import cn.me.alphamq.nameserver.cache.Container;
import cn.me.alphamq.common.event.EventBus;
import cn.me.alphamq.nameserver.handler.service.TcpMsgServerHandler;
import cn.me.alphamq.common.util.NettyUtil;

/**
 * 基于 netty 启动 nameserver 服务
 *
 * @author f
 */
public class NameServerStarter {

    /**
     * 启动 nameserver 服务
     */
    public static void startServer() {
        NettyUtil.startNettyServer(
                Container.getNameServerProperties().getNameServerPort(),
                "nameserver-service",
                new TcpMsgServerHandler(new EventBus("broker-connection-task"))
        );
    }

}
